home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS Toolkit
/
BBS Toolkit.iso
/
rbbs_pc
/
colr174.zip
/
RSB4COLR.MRG
< prev
Wrap
Text File
|
1992-06-26
|
8KB
|
175 lines
* ------------[ BLED merge (c) Ken Goosens ]-------------
* Merge this against RBBSSUB4.BAS to produce RBBSSUB4.NEW
* RBBSSUB4.BAS: Date 3-5-1992 Size 127923 bytes
* ------------[ Created 05-17-1992 01:46:05 ]------------
* REPLACING old line(s) by new
58250 ' $SUBTITLE: 'SmartText - smart text substitution'
' $PAGE
'
' NAME -- SmartText (WRITTEN BY DOUG AZZARITO)
'
' INPUTS -- StringWork$ string to scan for Smart Text
' CRFound Does this line contain a CR?
' ZSmartTextCode Smart Text control code
'
' OUTPUTS -- StringWork$ Input string with Smart replaced
'
' PURPOSE -- Smart Text allows control strings in text files
' to be replaced at runtime with user info or other
' data. The Smart Text control code is a 1-byte
' code (configurable) with a 2-byte action code.
'
SUB SmartText (StringWork$, CRFound, OverStrike) STATIC
IF SmartCarry$<>"" THEN _
StringWork$ = SmartCarry$+StringWork$
Index = INSTR(StringWork$, ZSmartTextCode$)
WHILE Index > 0 AND Index < LEN(StringWork$)-1
IF INSTR(MID$(StringWork$, Index+1,2)," ") THEN _
SmartAct = 0 _
ELSE _
SmartAct = INSTR(ZSmartTable$, MID$(StringWork$, Index+1, 2))
IF SmartAct = 0 THEN _
WasI = 1 : _
GOTO 58254
SmartAct = (SmartAct+2)/3
ON SmartAct GOSUB 58260, 58261, 58262, 58263, 58264, 58265, _
58266, 58267, 58268, 58269, 58270, _
58271, 58272, 58273, 58274, 58275, _
* ------[ first line different ]------
58276, 58277, 58296, 58297, 58298, _ ' COLR174
58299, 58278, 58279, 58280, _ ' COLR174
58281, 58282, 58283, 58284, 58285, _
58286, 58287, 58289, 58290, 58291, _
58292, 58293, 58294, 58295
GOSUB 58256
WasI = LEN(SmartHold$)
ReplaceLen = 3
IF OverStrike OR Overlay THEN _
IF WasI > 2 THEN _
ReplaceLen = WasI _
ELSE _
SmartHold$ = SmartHold$ + SPACE$(3 - WasI)
StringWork$ = LEFT$(StringWork$, Index-1) + SmartHold$ + _
MID$(StringWork$,Index+ReplaceLen)
* REPLACING old line(s) by new
* ------[ first line different ]------
58294 SmartHold$ = ZSysopLastName$ ' LS Sysops Last Name ' RM051701
CALL NameCaps(SmartHold$)
RETURN
* REPLACING old line(s) by new
58295 SmartHold$ = ZConfName$ ' CN Conference Name
RETURN
* ------[ first line different ]------
* INSERTING new line(s)
58296 SmartHold$ = ZFG5$ ' C5 Color 5 ' COLR174
GOTO 58258 ' COLR174
58297 SmartHold$ = ZFG6$ ' C6 Color 6 ' COLR174
GOTO 58258 ' COLR174
58298 SmartHold$ = ZFG7$ ' C7 Color 7 ' COLR174
GOTO 58258 ' COLR174
58299 SmartHold$ = ZFG8$ ' C8 Color 8 ' COLR174
GOTO 58258 ' COLR174
END SUB
'
* REPLACING old line(s) by new
59934 ' $SUBTITLE: 'SetHiLite - subroutine to reset highlight preference'
' $PAGE
'
' NAME -- SetHiLite
'
' INPUTS -- PARAMETER MEANING
' SetTo New value (True or False)
' ZEmphasizeOnDef$ String turns emphasize on
' ZEmphasizeOffDef$ String turns emphasize off
'
' OUTPUTS -- ZHiLiteOff Callers preference on Hilite
' ZEmphasizeOn$ String to use for emphasis
' ZEmphasizeOff$ String to use after emphasis
'
SUB SetHiLite (SetTo) STATIC
ZHiLiteOff = (ZEmphasizeOnDef$ <> "" AND SetTo)
IF ZHiLiteOff THEN _
ZEmphasizeOn$ = "" : _
ZEmphasizeOff$ = "" : _
ZFG1$ = "" : _
ZFG2$ = "" : _
ZFG3$ = "" : _
* ------[ first line different ]------
ZFG4$ = "" : _ ' COLR174
ZFG5$ = "" : _ ' COLR174
ZFG6$ = "" : _ ' COLR174
ZFG7$ = "" : _ ' COLR174
ZFG8$ = "" _ ' COLR174
ELSE ZEmphasizeOn$ = ZEmphasizeOnDef$ : _
ZFG1$ = ZFG1Def$ : _
ZFG2$ = ZFG2Def$ : _
ZFG3$ = ZFG3Def$ : _
ZFG4$ = ZFG4Def$ : _ ' COLR174
ZFG5$ = ZEscape$ + "[1;40;31m" : _ ' RED ' COLR174
ZFG6$ = ZEscape$ + "[1;40;34m" : _ ' BLUE ' COLR174
ZFG7$ = ZEscape$ + "[1;40;37m" : _ ' WHITE ' COLR174
ZFG8$ = ZEscape$ + "[1;37;44m" ' WHITE ON BLUE ' COLR174
END SUB
* REPLACING old line(s) by new
59965 ' $SUBTITLE: 'UserColor - lets user set color for normal text'
' $PAGE
'
' NAME -- UserColor
'
' INPUTS -- PARAMETER MEANING
' ZEmphasizeOff$ Normal text color
'
' OUTPUTS -- ZEmphasizeOff$ New text color
' ZBoldText$ Whether bold (0 not, 1 bold)
' ZUserTextColor ANSI Color selected
'
' PURPOSE -- Lets caller select desired color and whether bold.
'
SUB UserColor STATIC
IF ZHiLiteOff THEN _
* ------[ first line different ]------
EXIT SUB _ ' COLR174
ELSE _ ' COLR174
ZFG5$ = ZEscape$ + "[1;40;31m" : _ ' RED ' COLR174
ZFG6$ = ZEscape$ + "[1;40;34m" : _ ' BLUE ' COLR174
ZFG7$ = ZEscape$ + "[1;40;37m" : _ ' WHITE ' COLR174
ZFG8$ = ZEscape$ + "[1;37;44m" ' WHITE ON BLUE ' COLR174
* REPLACING old line(s) by new
59980 ' $SUBTITLE: 'SetGraphic - Sets user graphic preference'
' $PAGE
'
' NAME -- SetGraphic
'
' INPUTS -- PARAMETER MEANING
' GraphicsNumber 0=None, 1=Ascii, 2=color
'
' OUTPUTS -- ZWasGR Shared var - set to
' graphics.number
' ZUserGraphicDefault$ What add to file name to
' see if got graphics file ver
'
' PURPOSE -- Sets file graphics preference
'
SUB SetGraphic (GraphicsNumber) STATIC
ZWasGR = GraphicsNumber
IF ZWasGR = 2 THEN _
ZDR1$ = ZFG1Def$ : _
ZDR2$ = ZFG2Def$ : _
ZDR3$ = ZFG3Def$ : _
* ------[ first line different ]------
ZDR4$ = ZFG4Def$ : _ ' COLR174
ZDR5$ = ZFG5$ : _ ' COLR174
ZDR6$ = ZFG6$ : _ ' COLR174
ZDR7$ = ZFG7$ : _ ' COLR174
ZDR8$ = ZFG8$ _ ' COLR174
ELSE ZDR1$ = "" : _
ZDR2$ = "" : _
ZDR3$ = "" : _
ZDR4$ = "" : _ ' COLR174
ZDR5$ = "" : _ ' COLR174
ZDR6$ = "" : _ ' COLR174
ZDR7$ = "" : _ ' COLR174
ZDR8$ = "" ' COLR174
ZUserGraphicDefault$ = MID$(" GC",ZWasGR+1, - (ZWasGR > 0))
END SUB